package com.wang.mall.exception;

import com.wang.mall.model.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//@RestControllerAdvice
public class GloableExceptionHandler {


    //@ExceptionHandler(InventoryShortageException.class)
    public R InventoryShortageExceptionHandler(InventoryShortageException e) {
        return R.fail("商品库存不足");
    }
}
